Expand description
Basic widget properties and helpers for declaring widgets and properties.
§Widget Instantiation
See enable_widget_macros!
if you want to instantiate widgets without depending on the zng
crate.
§Crate
This crate is part of the zng
project.
§Cargo Features
This crate provides 3 feature flags, 1 enabled by default.
§"debug_default"
Signal the build script to enable the "dyn_*"
, "inspector"
and "trace_widget"
features in debug builds.
Enabled by default.
§"dyn_closure"
Box closures at opportune places, such as Var::map
, reducing the number of monomorphised types.
This speeds-up compilation time at the cost of runtime.
§"http"
Enable web tasks.
Modules§
- Helper nodes.
- Prelude for declaring properties and widgets.
Macros§
- Declare one or more command event properties.
- Enable widget instantiation in crates that can’t depend on the
zng
crate. - Declare one or more event properties.
- Declares a widget function closure.
Structs§
- Arguments for the node operation event properties.
W
Minimal widget.- Boxed shared closure that generates a widget for a given data.
Enums§
- Defines if and how a widget is hit-tested.
- Inline mode explicitly selected for a widget.
Traits§
- Widget info builder extensions for
modal
control.
Functions§
P
Aligns the widget within the available space.P
Defines if the widget only renders if it’s bounds intersects with the viewport auto-hide rectangle.P
Border widths, color and style.P
Position of a widget borders in relation to the widget fill.P
If the border is rendered over the fill and child visuals.P
Clips the widget child to the area of the widget when set totrue
.P
Defines the preferred color scheme in the widget and descendants.P
Corner radius of widget and inner widgets.P
Defines how thecorner_radius
is computed for each usage.P
Defines if default interaction is allowed in the widget and its descendants.P
Defines if and how the widget is hit-tested.P
Enforce an inline mode on the widget.P
Defines if any interaction is allowed in the widget and its descendants.P
If the widget isCollapsed
.P
If the widget is disabled for interaction.P
If the widget is enabled for interaction.P
If the widget isHidden
.P
If the widget is visible for hit-tests.P
If the widget has been initialized.P
If the layout direction is left-to-right.P
If the layout direction is right-to-left.P
If the widget isVisible
.P
Margin space around the widget.P
Only allow interaction inside the widget, descendants and ancestors.P
Include itself in the allow list of another widget that ismodal
or descendant of modal.P
Extra widgets that are allowed interaction by this widget when it ismodal
.P
Widget interactions now blocked.P
Widget interactions where blocked or unblocked.P
Widget deinited.P
Widget normal interactions now disabled.P
Widget normal interactions now enabled.P
Widget was enabled or disabled.P
Widget info is now available.P
Widget initialized.P
Widget interactivity changed.P
Widget global position changed.P
On any node operation.P
Previewon_block
event.P
Previewon_blocked_changed
event.P
Previewon_deinit
event.P
Previewon_disable
event.P
Previewon_enable
event.P
Previewon_enabled_changed
event.P
Previewon_init
event.P
Previewon_interactivity_changed
event.P
Previewon_move
event.P
Previewon_node_op
event.P
Previewon_transform_changed
event.P
Previewon_unblock
event.P
Previewon_update
event.P
Previewon_vis_disable
event.P
Previewon_vis_enable
event.P
Previewon_vis_enabled_changed
event.P
Widget global inner transform changed.P
Widget interactions now unblocked.P
Widgetupdate
event.P
Widget now looks disabled.P
Widget now looks enabled.P
Widget changed to enabled or disabled visuals.P
Defines what node list methods can run in parallel in the widget and descendants.P
Sets the widget visibility.P
Defines the render order of a widget in a layout panel.